package com.ruoyi.system.controller;

import com.ruoyi.system.domain.Area;
import com.ruoyi.system.service.IAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author:cocoKe
 * @Description:
 * @VERSON:1.8
 * @create:2025-02-27 10:25
 * @Date:2025/2/27
 */
@RestController
@RequestMapping("/area")
public class AreaController {

    @Autowired
    IAreaService areaService;

    @GetMapping("/getArea")
    public List<Area> getArea(int rootId){
        return  areaService.buildTree(rootId);

    }




}
